import request from '@/utils/request'

export function getList() {
  return request({
    url: 'https://api.vuejs-core.cn/getAd',
    method: 'get',
  })
}

// 获取供应商列表
export function getSupplierList(params) {
  return request({
    url: 'http://42.193.222.82:8080/api/purchases/getPurchasesList',
    method: 'get',
    params
  })
}

// 删除供应商
export function deleteSupplier(data) {
  return request({
    url: 'http://42.193.222.82:8080/api/purchases/deletePurchases',
    method: 'delete',
    data
  })
}

// 创建供应商
export function createSupplier(data) {
  return request({
    url: 'http://42.193.222.82:8080/api/purchases/createPurchases',
    method: 'post',
    data
  })
}

// 更新供应商
export function updateSupplier(data) {
  return request({
    url: ' http://42.193.222.82:8080/api/purchases/updatePurchases',
    method: 'put',
    data
  })
}

// 近五年某地某学校某专业的高考分数线
export function getSchoolLine(params) {
  return request({
    url: 'http://42.193.222.82:8082/info',
    method: 'get',
    params
  })
}

// 预测未来3年的结果
export function getPredict(data) {
  return request({
    url: 'http://42.193.222.82:8082/predict',
    method: 'post',
    data
  })
}
